
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td><H2><font color="#336699" class="PageHeader">Basic Usage of Grid Engine</font></H2></td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td>

<br><br>
<VAR><B><U><SPAN STYLE="font-style: normal">qstat - Show job/queue
status</SPAN></U></B><I><BR><BR></I><SPAN STYLE="font-style: normal">no
arguments Show currently running/pending jobs<BR>-f Show full listing
of all queues<BR>-j Shows detailed information on pending/running
job<BR>-U Shows current jobs by user</SPAN></VAR></P>
<P><VAR><B><U><SPAN STYLE="font-style: normal">qhost - Show job/host
status</SPAN></U></B><I><BR><BR></I><SPAN STYLE="font-style: normal">no
arguments Show a table of all execution hosts and information about
their configuration<BR>-l attr=val Show only certain hosts<BR>-j
Shows detailed information on pending/running job<BR>-q Shows
detailed information on queues at each host</SPAN></VAR></P>
<P><VAR><B><SPAN STYLE="font-style: normal">Using Grid Engine</SPAN></B><I><BR><BR></I><SPAN STYLE="font-style: normal">The
main submit commands are qsub, qrsh and qtcsh. See the man pages for
submit(1) and qtcsh(1) for more details.</SPAN></VAR></P>
<P><VAR><VAR><VAR><VAR><B><U><SPAN STYLE="font-style: normal">qsub -
submit scripts</SPAN></U></B><I><BR><BR></I><SPAN STYLE="font-style: normal">Started
with no arguments it accepts input from STDIN (^D to send submit
input)<BR>-cwd Run the job from the current working
directory<BR>(Default: Home directory)</SPAN><I><BR></I><SPAN STYLE="font-style: normal">-v
</SPAN><VAR><VAR><VAR><VAR><SPAN STYLE="font-style: normal">Pass the
variable VAR (-V passes all variables)<BR>-o Redirect standard output
(Default: Home directory)<BR>-e Redirect standard error (Default:
Home directory)<BR><BR>Example:</SPAN></VAR></VAR></VAR></VAR></VAR></VAR></VAR></VAR></P>
<P><VAR><VAR><SPAN STYLE="font-style: normal"><FONT FACE="Courier, monospace">qsub
-cwd -v SOME_VAR -o /dev/null -e /dev/null myjob.sh</FONT></SPAN></VAR></VAR></P>
<P><VAR><I><BR></I><SPAN STYLE="font-style: normal">In general, qsub
is used for traditional batch submit, that is where I/O is directed
to a file. Note that qsub only accepts shell scripts, not executable
files.<BR><BR>See the qsub(1) man page for more details.</SPAN></VAR></P>
<P><VAR><VAR><B><U><SPAN STYLE="font-style: normal">qrsh</SPAN></U></B><I><BR><BR></I><SPAN STYLE="font-style: normal">Qrsh
acts similar to the rsh command, except that a host name is not
given. Instead, a shell script or an executable file is run,
potentially on any node in the cluster. I/O is directed back to the
submitter's terminal window. By default, if the job cannot be run
immediately, qrsh will not queue the job. Using the '-now no' flag to
qrsh will allow jobs to queue. Note that I/O can be redirected with
the shell redirect operators. For example, to run the uname -a
command:</SPAN><I><BR><BR></I><SPAN STYLE="font-style: normal">qrsh
uname -a</SPAN><I><BR><BR></I><SPAN STYLE="font-style: normal">The
uname of some machine the scheduler selects in the cluster will then
be displayed on the submitting terminal. To redirect the
output,</SPAN><I><BR><BR></I><SPAN STYLE="font-style: normal">qrsh
uname -a &gt; /tmp/myfile</SPAN><I><BR><BR></I><SPAN STYLE="font-style: normal">The
output from uname will be written to /tmp/myfile on the submitting
host. To allow the command to queue:</SPAN><I><BR><BR></I><SPAN STYLE="font-style: normal">qrsh
-now no uname -a</SPAN><I><BR><BR></I><SPAN STYLE="font-style: normal">If
a suitable host is not immediately available the command will block
until a suitable host is available. At that time, the command output
will be displayed on the submitting terminal. </SPAN><I><BR><BR></I><SPAN STYLE="font-style: normal">See
the qrsh(1) man page for more details.</SPAN></VAR></VAR></P>
<P><VAR><B><U><SPAN STYLE="font-style: normal">qtcsh</SPAN></U></B><I><BR><BR></I><SPAN STYLE="font-style: normal">Grid
Engine contains a modified tcsh, qtcsh which will automatically
submit jobs listed in a task file to the cluster. See the qtcsh(1)
and qtask(5) man pages for more details. </SPAN></VAR>
</table>
</P>